<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex benben-position-layout flex flex-wrap align-center inteGral_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between flex-sub inteGral_fd0_0'      >
            <view   class='flex flex-wrap align-center inteGral_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <image class='inteGral_fd0_0_c0_c0'  mode="aspectFit"  :src='STATIC_URL+"307.png"'></image>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='inteGral_fd0_0_c1_c0'  >{{$t('积分商城')}}</text>
</view>
    <view   class='flex flex-wrap align-center inteGral_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/jf/rulesExchange/rulesExchange`"   >
        <image class='inteGral_fd0_0_c2_c0'  mode="aspectFit"  :src='STATIC_URL+"154.png"'  v-if= " appSystemIdentification!='Wechat'"></image>
</view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---积分分类flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout inteGral_flex_1"    >
            <view   class='flex flex-direction flex-wrap align-center inteGral_fd1_0'      >
        <text class='inteGral_fd1_0_c0'  >{{dataDetails.score}}</text>
<text class='inteGral_fd1_0_c1'  >{{$t('账户积分')}}</text>
    <view   class='flex flex-wrap align-center inteGral_fd1_0_c2'   @tap="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/jf/exChange/exChange`"   >
        <text class='inteGral_fd1_0_c2_c0'  >{{$t('兑换记录')}}</text>
</view>
</view>
    <view   class='flex flex-direction align-stretch inteGral_fd1_1'      >
            <template v-for = '(item,key0) in dataList'>
    <view   class='flex align-stretch inteGral_fd1_1_c0'   @tap="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/jf/commoDity/commoDity?commodity_id=${item.aid}`"    :key='key0'>
            <view   class='flex flex-wrap align-stretch inteGral_fd1_1_c0_c0'      >
        <image class='inteGral_fd1_1_c0_c0_c0'  mode="aspectFill"  :src='item.thumb'></image>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch flex-sub inteGral_fd1_1_c0_c1'      >
        <text class='inteGral_fd1_1_c0_c1_c0'  >{{item.name}}</text>
    <view   class='flex flex-wrap align-center inteGral_fd1_1_c0_c1_c1'      >
        <text class='inteGral_fd1_1_c0_c1_c1_c0'    v-if= "item.is_shipping=='1'"  >{{item.stock}}</text><text class='inteGral_fd1_1_c0_c1_c1_c0_1'    v-if= "item.is_shipping=='0'"  >不包邮</text>
<text class='inteGral_fd1_1_c0_c1_c1_c0'    v-if= "item.is_shipping=='1'"  >{{item.stock}}</text><text class='inteGral_fd1_1_c0_c1_c1_c0_1'    v-if= "item.is_shipping=='0'"  >不包邮</text>
</view>
    <view   class='flex flex-wrap align-center justify-between'      >
            <view   class='flex flex-wrap align-center inteGral_fd1_1_c0_c1_c2_c0'      >
        <text class='inteGral_fd1_1_c0_c1_c2_c0_c0'  >{{item.integral}}</text>
<text class='inteGral_fd1_1_c0_c1_c2_c0_c1'    v-if= "item.shop_price!='0.00'"  >{{$t('积分+')}}</text><text class='inteGral_fd1_1_c0_c1_c2_c0_c1'    v-if= "item.shop_price=='0.00'"  >积分</text>
<text class='inteGral_fd1_1_c0_c1_c2_c0_c1'    v-if= "item.shop_price!='0.00'"  >￥</text>
<text class='inteGral_fd1_1_c0_c1_c2_c0_c3'    v-if= "item.shop_price!='0.00'"  >{{item.shop_price}}</text>
</view>
<button class='inteGral_fd1_1_c0_c1_c2_c1'    >{{$t('兑换')}}</button>
</view>
</view>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
</view>
        
<!---积分分类flex布局结束-->
<benben-popup v-model="popupShow1653901123045" :mask="true" :mask-close-able="true"  mode='center' >
    <!---兑换规则flex布局开始-->
 <view class="flex flex-direction flex-wrap align-center justify-center"    >
            <view   class='flex flex-direction flex-wrap align-stretch inteGral_fd2_0'      >
        <text class='inteGral_fd2_0_c0'  >{{$t('兑换规则')}}</text>
    
    <scroll-view  class='inteGral_fd2_0_c1'  :scroll-y='true'  >
        <view class='flex flex-direction align-stretch benben-scroll flex'    >
                    <jyf-parser class='inteGral_fd2_0_c1_c0'  :html="dataEssay.content | richTextFormat"  >
        </jyf-parser>
</view>
    </scroll-view>
    
</view>
<image class='inteGral_fd2_1'  mode="aspectFit"  :src='STATIC_URL+"190.png"' @tap.stop="popupShow1653901123045=false" ></image>
</view>
        
<!---兑换规则flex布局结束-->
    
</benben-popup>
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"popupShow1653901123045":false,"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"newslist":[{"name":"小油菜","value":"","image":"https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20220526/10daa2765308794f99b8f2fcaa185ddc.png"},{"name":"酱香猪蹄","value":"","image":"https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20220528/d2b2b7287ff3282502a8b9789a3948c4.png"},{"name":"菊花","value":"","image":"https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20220528/d15cbfa4d75281385ef73f7dd01a8acc.png"}],"commoditype":"1","dataList":[],"dataMessage":[],"index":1,"dataDetails":{"invite_code":"","address":"","address_code":"","hobby":"","tags":"","id":"","userlevel_id":"","mobile":"","real_name":"","avatar":"","account":"","email":"","birthday":"","gender":"","create_time":"","user_money":"","freeze_money":"","total_consumption_money":"","score":"","_mobile":"","coupon":"","collection_count":"","browse_count":"","total_money":"","certified":"","nickname":"","is_pay_password":"","follow_count":""},"dataEssay":{"content":""}};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
                         isLogin() {
      return this.$store.state.token == '' ? false : true;
    },
      /**
     * @returns 
      * Android       安卓
      * IOS       苹果
      * Web       H5 或 pc
      * Wechat       微信小程序
      * Alipay       支付宝小程序
      * Baidu       百度小程序
      * ByteBounce       抖音小程序
      * 360       360小程序
      * FastApp       快应用
    */
    appSystemIdentification() {
      return this.$store.state.appSystemIdentification
    }
		},
		watch:{},
		onLoad(options){
            this.getListFunc()
this.getTypeFunc()
this.getRuleFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            this.getUserinfoFunc()
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            this.getListFunc()
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取个人信息
                async getUserinfoFunc(){
                        if( this.isLogin===true){
            //请求方法
    //数据验证
    
  let datadataDetails = await this.$api.get(global.apiUrls.post5c78c4772da97, {
    
  });
  
  if (datadataDetails.data.code != 1) {
    this.$message.info(datadataDetails.data.msg);
    return
  } 
  let infodataDetails = datadataDetails.data;
  this.dataDetails = infodataDetails.data
  
    }
                },
                //积分商城-积分商品列表
                 getListFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post641457e74fa3e;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {}
                this.listData = [];
                this.dataList = this.listData;
                this.pagingListToggle();
                
                },
                //积分商城-兑换规则
                async getRuleFunc(){
                        //请求方法
    //数据验证
    
  let datadataEssay = await this.$api.post(global.apiUrls.post64156a0fd7451, {
    
  });
  
  if (datadataEssay.data.code != 1) {
    this.$message.info(datadataEssay.data.msg);
    return
  } 
  let infodataEssay = datadataEssay.data;
  this.dataEssay = infodataEssay.data
  
                },
                //积分商城-滚动兑换人员信息
                async getTypeFunc(){
                        //请求方法
    //数据验证
    
  let datadataMessage = await this.$api.post(global.apiUrls.post64156140edd5a, {
    
  });
  
  if (datadataMessage.data.code != 1) {
    this.$message.info(datadataMessage.data.msg);
    return
  } 
  let infodataMessage = datadataMessage.data;
  this.dataMessage = infodataMessage.data
  
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:url(image-path('153.png')) no-repeat;background-size: 100% auto;
        }
    .inteGral_flex_0{
        background:url(image-path('153.png')) no-repeat;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .inteGral_fd0_0_c2_c0{
        width:42rpx;height:42rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx 0rpx 0rpx auto;
    }
    .inteGral_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#fff;line-height:88rpx;
    }
    .inteGral_fd0_0_c0_c0{
        width:20rpx;height:36rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .inteGral_fd0_0_c0{
        width:130rpx;
    }
    .inteGral_fd0_0{
        margin:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .inteGral_flex_1{
        padding:0rpx 0rpx 0rpx 0rpx;
    }
    .inteGral_fd1_1_c0_c1_c2_c1{
        background:var(--benbenbgColor7);border-radius:28rpx 28rpx 28rpx 28rpx;font-size:24rpx;color:var(--benbenFontColor3);width:130rpx;height:56rpx;line-height:56rpx;
    }
    .inteGral_fd1_1_c0_c1_c2_c0_c3{
        font-size:32rpx;font-weight:700;color:var(--benbenFontColor7);margin:0rpx 8rpx 0rpx 0rpx;
    }
    .inteGral_fd1_1_c0_c1_c2_c0_c1{
        font-size:22rpx;font-weight:600;color:var(--benbenFontColor7);
    }
    .inteGral_fd1_1_c0_c1_c2_c0_c0{
        font-size:32rpx;font-weight:700;color:var(--benbenFontColor7);
    }
    .inteGral_fd1_1_c0_c1_c2_c0{
        margin:0rpx 20rpx 0rpx 0rpx;
    }
    .inteGral_fd1_1_c0_c1_c1_c0_1{
        color:#999999;font-size:20rpx;font-weight:400;line-height:28rpx;
    }
    .inteGral_fd1_1_c0_c1_c1_c0{
        color:var(--benbenFontColor2);font-size:22rpx;font-weight:400;line-height:28rpx;
    }
    .inteGral_fd1_1_c0_c1_c1{
        margin:24rpx 0rpx auto 0rpx;
    }
    .inteGral_fd1_1_c0_c1_c0{
        color:#333333;font-size:28rpx;font-weight:600;line-height:40rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .inteGral_fd1_1_c0_c1{
        margin:0rpx 0rpx 0rpx 24rpx;
    }
    .inteGral_fd1_1_c0_c0_c0{
        width:220rpx;height:220rpx;border-radius:16rpx;
    }
    .inteGral_fd1_1_c0_c0{
        position:relative;
    }
    .inteGral_fd1_1_c0{
        border-bottom:1px solid #eee;padding:32rpx 0rpx 32rpx 0rpx;
    }
    .inteGral_fd1_1{
        background:var(--benbenbgColor1);background-size:100% auto;border-radius:24rpx;padding:13rpx 32rpx 32rpx 32rpx;
    }
    .inteGral_fd1_0_c2_c0{
        color:var(--benbenFontColor3);font-weight:700;font-size:26rpx;padding:10rpx 19rpx 10rpx 19rpx;
    }
    .inteGral_fd1_0_c2{
        background:rgba(255,255,255,0.3);height:56rpx;background-size:100% auto;border-radius:28rpx 0rpx 0rpx 28rpx;position:absolute;right:0rpx;
    }
    .inteGral_fd1_0_c1{
        font-size:28rpx;font-weight:400;color:#fff;
    }
    .inteGral_fd1_0_c0{
        font-size:60rpx;font-weight:700;color:#fff;margin:0rpx 0rpx 12rpx 0rpx;
    }
    .inteGral_fd1_0{
        padding:48rpx 24rpx 43rpx 24rpx;position:relative;margin:0rpx 0rpx 0rpx 0rpx;
    }
    .inteGral_fd2_1{
        border-radius:28rpx 28rpx 28rpx 28rpx;width:56rpx;height:56rpx;margin:48rpx 0rpx 0rpx 0rpx;
    }
    ::v-deep .inteGral_fd2_0_c1_c0{
        width:100%;
    }
    .inteGral_fd2_0_c1{
        touch-action:none;width:470rpx;height:300rpx;
    }
    .inteGral_fd2_0_c0{
        font-size:36rpx;font-weight:800;color:rgba(51, 51, 51, 1);text-align:center;margin:0rpx 0rpx 32rpx 0rpx;
    }
    .inteGral_fd2_0{
        background:#fff;border-radius:25rpx 25rpx 25rpx 25rpx;padding:40rpx 32rpx 44rpx 32rpx;width:540rpx;
    }
</style>